package com.xingkeduo.pojo.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

@Getter
public enum ServiceType{
    HAIRCUT(1,"单人剪发服务"),
    BANGS(2,"单人刘海服务"),
    SENIOR(3,"美式Barber"),
    OTHER(5,"10分钟速剪服务");//随行付

    @EnumValue
    private int key;

    private String value;

    ServiceType(int key, String value) {
        this.key = key;
        this.value = value;
    }

    public static ServiceType getEnum(int num){
        for (ServiceType s : ServiceType.values())
            if(s.key==num){
                return s;
            }
        return null;
    }
}
